home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / cli / system2.arc / DELDIR.XSL < prev    next >
Text File  |  1985-11-20  |  639b  |  43 lines

  1. *
  2. * DELDIR.XSL
  3. * XSL shell script to delete a folder and its contents
  4. * (will not recursively delete folders)
  5.  
  6. * Syntax: DELDIR directory
  7.  
  8. * (C) Copyright 1989 by DW Software
  9.  
  10.  
  11.  
  12. * *** PRINT SYNTAX MESSAGE ***
  13.  
  14. if notequal %argc 1
  15.   echo "  Syntax: DELDIR directory"
  16.   echo
  17.   exit -2
  18. endif
  19.  
  20.  
  21. * *** REMOVE FILES WITHIN FOLDER ***
  22.  
  23. rm %1\*.*
  24. if notequal %result 0
  25.   echo "  deldir: can't delete files within directory "%1
  26.   echo
  27.   exit -1
  28. endif
  29.  
  30.  
  31. * *** REMOVE FOLDER ***
  32.  
  33. rmdir %1
  34. if notequal %result 0
  35.   echo "  deldir: can't remove directory "%1
  36.   echo
  37.   exit -1
  38. endif
  39.  
  40. * *** FINISHED OK ***
  41.  
  42. exit
  43.